package com.atde._05_behavioral_design_patterns.strategy;


/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._05_behavioral_design_patterns.strategy
 * @Author: Del
 * @CreateTime: 2025-06-30  15:11
 * @Description: 策略模式：鸭子抽象类
 * @Version: 1.0
 */
public abstract class Duck {
    public Duck() {
        super();
    }

    // 显示鸭子信息
    public abstract void display();

    public void quack() {
        System.out.println("Quack...");
    }

    public void swim() {
        System.out.println("游泳的鸭子...");
    }

    public void fly() {
        System.out.println("鸭子会飞...");
    }
}
